home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8118 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: news1.h1.usa.pipeline.com!usenet
  2. From: grantp@usa.pipeline.com(Pete)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: [Q] Newbie problem with inheritance (PLEASE HELP!)
  5. Date: 14 Feb 1996 22:23:04 GMT
  6. Organization: Kalevi, Inc.
  7. Message-ID: <4ftnc8$eib@news1.usa.pipeline.com>
  8. NNTP-Posting-Host: pipe15.h1.usa.pipeline.com
  9. X-PipeUser: grantp
  10. X-PipeHub: usa.pipeline.com
  11. X-PipeGCOS: (Pete)
  12. X-Newsreader: Pipeline USA v3.3.0
  13.  
  14. On Feb 13, 1996 06:24:35 in article <[Q] Newbie problem with inheritance
  15. (PLEASE HELP!)>, '"Abe L. Getchell" <panther@iglou.com>' wrote: 
  16.  
  17.  
  18. >Let me see if I have this correct...  in BC++ 4.51- 
  19. >In public inheritance public members stay public, protected members stay 
  20. >protected, and the private members are NOT inherited to the derived class.
  21.  
  22. Well, actually they are.  Private members are inherited in the sense that 
  23. they are parts of the subclass -- they just aren't accessible to 
  24. the subclass methods. 
  25.  
  26. >In protected inheritance, public members turn to protected members, and 
  27. >protected members turn to private members, and private members of the 
  28. >base class are NOT inherited to the derived class. 
  29. No.  The level of inheritance specifies the maximum level of exposure. 
  30. Public members drop down to this level; i.e., protected, but protected 
  31. members remain as they are. 
  32.  
  33. >In private inheritance, public and protected members become private
  34. members, 
  35. >and private members are NOT inherited to the derived class. 
  36. As stated above, private members are inherited, they're just not  
  37. accessible. 
  38.  
  39. -- 
  40. Pete Grant 
  41. Kalevi, Inc. 
  42. Software Engineering & development
  43.